<template>
  <div class="home">
    <Search :placeholder="placeholder" />
    <div class="content">
      <van-tabs title-active-color="#ee0a24">
        <van-tab v-for="(item,index) in tabs" :title="item" :key="index">
          内容 {{ index }}
        </van-tab>
      </van-tabs>
    </div>
    <TarBar />
  </div>
</template>
 
<script>
// @ is an alias to /src
import instance from "../api/api";
import TarBar from "../components/TarBar.vue";
import Search from "../components/Search.vue";

export default {
  name: "HomeView",
  data() {
    return {
      placeholder: "首页搜索",
      tabs:['推荐','女装','鞋包','手机','食品','母婴','男装','百货','内衣','电器','家纺','水果','家具','美妆','家装','运动','车品','医药','电脑','海淘','饰品','玩乐']
    };
  },
  components: {
    TarBar,
    Search,
  },
  methods: {
    fn() {
      instance.get("/get").then((res) => {
        console.log(res.data);
      });
    },
  },
};
</script>
<style scoped lang="less">
</style>
